/*
* @Author: majingyu
* @Date:   2017-05-10 17:32:43
* @Last Modified by:   jingyu.ma
* @Last Modified time: 2017-07-22 15:47:34
*/

import React, { Component }from 'react';
import { connect } from 'react-redux';
import { Router, Route, Link, hashHistory } from 'react-router';
import { changeNowPageWithHeaderState,changeShowStatus } from 'action/app';

class PublishBlock extends Component {
    constructor(props) {
        super(props);
    } 
    changeShow(){
        this.props.changeShowStatus()
    }
    render(){
        return (
            <div className="tab-content" onClick={()=>{this.changeShow()}}>
                <div className="tab-publish">
                    <div className="publish-service publish-info" >
                        <Link to='/sevicesList' query = {{name:'publish',type: 'service'}}>
                            <div className="service-image image-info">
                                <img src="/image/requier.png" alt="需求"/>
                            </div>
                            <p className="text">发布需求</p>
                        </Link>
                    </div>
                    <div className="publish-skill publish-info">
                        <Link to='/sevicesList' query = {{name:'publish',type: 'skill'}}>
                            <div className="service-image image-info">
                                <img src="/image/skill.png" alt="技能"/>
                            </div>
                            <p className="text">发布技能</p>
                        </Link>
                    </div>
                </div>
            </div>
        );
    } 
}
const publishData = (state) => {
    return {
        app:state.app
    }
}

let dispatchHandle = (dispatch, getState) => {
    return {
        toPage(page){
            dispatch(changeNowPageWithHeaderState(page));
        },
        changeShowStatus(){
            dispatch(changeShowStatus(false));
        }
    }
    
}
let visibilePublishBlock = connect(publishData, dispatchHandle)(PublishBlock);
export default visibilePublishBlock;
